Skip to content

feat(notifications): notify on failed workflow branches and name the failed run - #403

Merged
lightningpixel merged 1 commit into
devfrom
feat/293-run-error-notification
Nov 11, 2026
Merged

lightningpixel merged 1 commit into
devfrom
feat/293-run-error-notification

Conversation

@lightningpixel

Copy link
Copy Markdown
Owner

Closes #293

Context

Most of #293 was already on dev: commit f3a7014 added error toasts for single generations and full workflow runs. This PR closes the remaining gaps.

Changes

  • Failed workflow branches now notify. A Wait branch started with Continue used to fail silently. It now shows "Workflow branch failed", once per failed branch. Nothing is sent after a cancellation (finishBranch returns early when the run was cancelled).
  • The toast says what failed. The body is now <model id | workflow name>: <first line of the error>. A plain Error: prefix is stripped, but specific ones like RuntimeError: are kept. The body is cut to 120 characters, and an empty error becomes "Unknown error".
  • No toast after a cancel. If the user cancels a generation while the last status check is still waiting, a late "error" answer no longer triggers one.
  • showErrorNotification is replaced by showRunErrorNotification(input), built on a pure buildRunErrorNotification(). Same focus check and click-to-focus behaviour as the completion toast.

Test plan

  • notification.test.ts (new): 7/7
  • workflowSceneRun.test.mjs: pass
  • pre-push hook (npm test, full suite) passed
  • eslint on the changed files: clean
  • Manual: fail a generation and a workflow branch with the window unfocused

…failed run

Generation and full workflow runs already raised an OS notification on
error, but a Wait branch started with Continue that failed stayed silent,
and every error toast dumped the raw String(err) with no context.

- Extract buildRunErrorNotification(): no toast for a user cancellation,
  otherwise "<model id | workflow name>: <first line of the error>",
  generic "Error: " prefix stripped, truncated to 120 chars
- Notify when a workflow branch (continueRun) fails
- Skip the generation error toast if the user cancelled while the last
  status poll was in flight
- Same focus gating and click-to-focus behaviour as completion toasts

Closes #293
@lightningpixel
lightningpixel merged commit 81f9740 into dev Nov 11, 2026
5 checks passed
@lightningpixel
lightningpixel deleted the feat/293-run-error-notification branch November 11, 2026 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant